Alarm and Event Handler
Posted by Robert Ward | 9/11/2020
Updated by Robert Ward | 6/2/2021
Updated by Robert Ward | 11/18/2022
Updated by Robert Ward | 5/10/2024
Updated by Robert Ward | 9/27/2024
In order for the PLC to serve Alarms and Events up to the WXS, there are a few AOIs that need to be added to the logic.
Globally, there must be a single instance of “wxsAlarmEventHandler” added into the logic.
Create a Controller level tag called "wxsAlarmHandler" and of data type "wxsAlarmEventParams"
This tag should be "wxsAlarmHandler.Handler" and should be found within the wxsAlarmHandler UDT tag.
Explanation of Tags:
-
plcNewAlarmTrigger (wxsAlarmHandler.NewAlarmTrigger)
- Data Type: BOOL
- Use: This tag, upon change from False to True, will execute the Handler by setting an internal Trigger bit TRUE that the WXS polls. Once True, the WXS reads plcClass, plcLocation, plcDescription, and plcDuration from this block. Upon a successful read, the WXS will set the internal Trigger bit to False.
- This tag, plcNewAlarmTrigger, will be set to False once the data has been successfully served up to the WXS.
-
plcRecordAppend (wxsAlarmHandler.RecordAppend)
- Data Type: STRING
- Use: When the PLC wishes to edit a duration field of an existing record, it can list the record ID here that was received at the time of initial record creation.
- Note: This is supported as of 6/2/2021 in v02 of Event Spooler and v03 of the Handler
-
plcDBRecordID (wxsAlarmHandler.DBRecordID)
- Data Type: STRING
- Use: Once a record is created in the DB, the WXS will return that record ID to this tag. Therefore, it can be used such that once the Trigger bit goes from True to False, copy the RecordID and set it aside for later use.
-
plcClass (wxsAlarmHandler.Class)
-
Data Type: STRING
-
Max length of STRING to be (15)
-
Use: This serves the class (or Type) of Alarm or Event the user wishes to display on the WXS. This can be any STRING the user chooses; however, preloaded Classes are:
- Alarm
- Warning
- Error
- Comm Failure
- Info
- Notification
- Lane Full
- Jam
- E-Stop
-
Please note, Pendant auto-separates and segregates between Alarms and Events. Therefore, they will automatically separate into Alarm tables and Event Tables. In order to satisfy this segregation, we suggest the user uses the Classes listed above. Here is the breakdown:
-
Alarms Table
- Alarm
- Warning
- Error
- Comm Failure
-
Events Table
- Info
- Notification
- Lane Full
- Jam
- E-Stop
-
As a note, Pendant determined that any item requiring maintenance or facilities intervention, shall show up on the Alarms table, and any item other item be considered an Event.
-
-
plcLocation (wxsAlarmHandler.Location)
- Data Type: STRING
- Max length of STRING to be (25)
- Use: User can use this to segregate sections of a system for filtering purposes in the WXS. E.g. Inbound, Outbound, Processing, Returns, etc.
-
plcDescription (wxsAlarmHandler.Description)
- Data Type: STRING
- Max length of STRING to be (35)
- Use: User uses this field to describe the Alarm or Event and perhaps even the remedy path.
-
plcDuration (wxsAlarmHandler.Duration)
- Data Type: STRING
- Use: N/A
-
Once the Handler has been added and configured, the user can now add the "wxsEventSpooler" AOI throughout the program using one instance for each Alarm/Event the user wishes to queue for the AlarmEventHandler to serve up to the WXS.
Explanation of Tags:
-
TriggerOn
- Data Type: BOOL (Immediate)
- Use: This tells the Spooler if the alarm should be triggered on TRUE or FALSE relating to the bitEventTrigger bit.
-
bitEventTrigger
- Data Type: BOOL
- Use: This bit is monitored for Alarm Trigger. The user must return this bit to false/true once the alarm/event conditions have cleared, as the AOI will not do that.
-
bitGlobalEventLatch (wxsAlarmHandler.NewAlarmTrigger)
- Data Type: BOOL
- Use: This is a global bit that should be common between every program instance of the wxsEventSpooler AOI. This bit allows multiple events to occur at the exact same time and allows the Spooler to queue them and only serve one event at a time without risking overlooking the other alarms/events.
- This tag should be the same tag as plcNewAlarmTrigger on the wxsAlarmEventHandler.
-
EventRecordID (wxsAlarmHandler.RecordAppend)
- Data Type: STRING
- Use: This tag is the returned record ID of where the alarm/event was stored in the WXS DB table.
-
plcDBRecordID (wxsAlarmHandler.DBRecordID)
- Data Type: STRING
- Use: This tag must be the same tag as the wxsAlarmEventHandler plcDBRecordID tag
-
strEventClass
- Data Type: STRING
- Use: This tag is likely a is the class type constant that the user wants copied into the Class field in the WXS table. I.e. if this Spooler is being used to serve an “Alarm” then the static text in this tag should be “Alarm”
-
plcClass (wxsAlarmHandler.Class)
- Data Type: STRING
- Use: This must be the same tag as plcClass in the wxsAlarmEventHander AOI
-
strEventLocation
- Data Type: STRING
- Use: User can use this to segregate sections of a system for filtering purposes in the WXS. E.g. Inbound, Outbound, Processing, Returns, etc.
-
plcLocation (wxsAlarmHandler.Location)
- Data Type: STRING
- Use: This must be the same tag as plcLocation in the wxsAlarmEventHander AOI
-
strEventDescription
- Data Type: STRING
- Use: User uses this field to describe the Alarm or Event and perhaps even the remedy path.
-
plcDescription (wxsAlarmHandler.Description)
- Data Type: STRING
- Use: This must be the same tag as plcDescription in the wxsAlarmEventHander AOI
This KB Article has accompanying downloads. Please reach out to your rep.
This Handler/Article now has a UDT for download